<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ page import="java.util.List" %>
<%@ page import="app.myproject.model.EventVO" %>
<%@ page import="com.google.appengine.api.datastore.KeyFactory" %>
<html>
<body>
	<h2>All Events</h2>
	
	<a href="add">Add Event</a> | <a href="list">Refresh</a>
	
	<table border="1">
		<thead>
			<tr>
				<td>Name</td>
				<td>Description</td>
				<td>Created Date</td>
				<td>Action</td>
			</tr>
		</thead>

		<c:forEach items="${eventList}" var="event">
			<tr>
			  <td>${event.name}</td>
			  <td>${event.description}</td>
			  <td>${event.date}</td>
			  <td>
			  	<a href="update/${event.keyAsString}">Update</a> | <a href="delete/${event.keyAsString}">Delete</a>
		      </td>
			</tr>
		</c:forEach>
		
     
	</table>
	
</body>
</html>